% 波前残余均方差
function phi = sigma_phi(Cn2, h_m, H_m)

% fun = @(z) Cn2(z*10^(-3));
H_bot = H_m(1:end-1);
H_top = H_m(2:end);
phi = 0;
for i = 1:length(h_m)
    fun = @(z) Cn2(z*10^(-3)) .* (abs(z - h_m(i))).^(5/3);
    fun_itgl = integral(fun,H_bot(i),H_top(i));
    phi = phi + fun_itgl;
end


end